<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
	<link rel="stylesheet" type="text/css" href="../../css/api.css" />
	<link rel="stylesheet" type="text/css" href="../../css/common.css" />
	<link rel="stylesheet" type="text/css" href="../../css/aui.css" />
  <link rel="stylesheet" type="text/css" href="../../css/aui-pull-refresh.css" />
  <title>学术</title>
  <style>
		html, body {width: 100%;min-height: 100%;background: #f0f0f0;}
    .h20 {height: 0.5rem;background: #f0f0f0;}
    .xsTab .aui-tab-item {
      border: none;
      position: relative;
    }
    .xsTab .aui-tab-item:after {
      content: '';
      display: block;
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      width: 50%;
      height: 2px;
      background: #fff;
      margin: auto;
    }
    .xsTab .aui-tab-item.aui-active {
      color: #2997e4;
    }
    .xsTab .aui-tab-item.aui-active:after {
      background: #2997e4;
    }
    .xsContent > div {
      display: none;
    }
    .xsContent .aui-list-item-title {
      color: #333;
      line-height: 1.2rem;
      font-size: 0.8rem;
    }
    .xsContent .aui-info-item {
      color: #999;
      font-size: 0.7rem;
    }
    .xsContent .aui-list-item-media {
      width: 6.5rem;
    }
    .xsContent .aui-list-item.last-item .aui-list-item-title {
      color: #666;
      font-size: 0.7rem
    }
    .xsContent .item_video {
      position: relative;
      padding: 0;
    }
    .xsContent .item_video .mask {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 1;
      background: rgba(0, 0, 0, 0.1);
    }
    .xsContent .item_video .mask_mid {
      width: 2rem;
      width: 4rem;
      height: 4rem;
      padding: 1rem;
      position: absolute;
      left:0;
      right:0;
      top: 0;
      bottom: 0;
      margin: auto;
      border-radius: 50%;
      background: rgba(0,0,0,0.3);
      text-align: center;
    }
    .xsContent .item_video .mask_mid img {
      height: 100%;
      width: auto;
      margin-left: auto;
      margin-right: 0;
    }
    .xsContent .item_video .mask_bot {
      color: #fff;
      position: absolute;
      bottom: 0;
      width: 100%;
      padding: 1rem;
    }
    .xsContent .item_video .mask_left {
      float: left;
      color: #fff;
      font-size: 0.7rem;
    }
    .xsContent .item_video .mask_left img {
      width: 0.7rem;
      display: inline-block;
      vertical-align: middle;
      margin-top: -0.25rem;
      margin-right: 0.25rem;
    }
    .xsContent .item_video .mask_right {
      float: right;
      color: #fff;
      font-size: 0.7rem;
    }
    .sp .aui-list {
      background: #f0f0f0;
    }
    .sp .aui-list .aui-list-item {
      background: #fff;
      margin: 0 0 0.5rem;
    }
    .zb {}
    .zb ul {
      background: #fff;
    }
    .zb ul li {
      padding: 0.5rem 1rem;
      border-bottom: 1px solid #e1e1e1;
    }
    .zb ul li h5 {
      font-size: 0.8rem;
      color: #333;
    }
    .zb ul li h5 span {
      color: #2997e4;
      float: right;
    }
    .jh .aui-list {
      margin-bottom: 2rem;
    }
    .jh_btn {
      position: fixed;
      left: 0;
      bottom: 0;
      width: 100%;
    }
    .jh_btn a {
      display: block;
      width: 100%;
      text-align: center;
      padding: 0.5rem 0;
      color: #fff;
      font-size: 0.8rem;
      background: #2997e4;
      font-weight: bold;
    }
    .itemIco {
      width: 100%;
      height: 4rem;
    }

		.hy .aui-media-list .aui-list-item-inner,.jh .aui-media-list .aui-list-item-inner {
			display: -webkit-box;
			display: -webkit-flex;
			display: flex;
			-webkit-box-orient: vertical;
			box-orient: vertical;
			-webkit-flex-direction: column;
			flex-direction: column;
			-webkit-box-pack: justify;
			-webkit-justify-content: space-between;
			justify-content: space-between;
			-webkit-box-align: start;
			-webkit-align-items: flex-start;
			align-items: flex-start;
		}
    #xsTab {
      position: fixed;
      width: 100%;
      top:0;
      z-index: 99;
    }
    .xsBox > .aui-refresh-content {
      min-height: calc(100vh - 40px);
    }
    body {
      padding-top:44px;
    }
  </style>
</head>
<body>
  <div id="app" v-cloak>
<div class="aui-tab xsTab" id="xsTab">
  <div class="aui-tab-item aui-active" @click="open_hyBox()">会议</div>
  <div class="aui-tab-item" @click="open_spBox()">视频</div>
  <div class="aui-tab-item" @click="open_zbBox()">直播</div>
  <div class="aui-tab-item" @click="open_jhBox()">解惑</div>
</div>
<div class="xsContent" id="xsContent">
  <div class="xsBox hy aui-content" style="display: block;">
  <section class="aui-refresh-content hyBox">
    <div class="h20"></div>
    <ul class="aui-list aui-media-list">
        <li class="aui-list-item" @click="openDetail('hy', '会议详情', item.id)" v-for="item in newsList">
          <div class="aui-media-list-item-inner">
            <div class="aui-list-item-media">
              <!-- <img :src="item.images"> -->
              <div v-if="item.images" class="itemIco" :style="'background: url('+ item.images +') center/cover no-repeat'"></div>
              <div v-else class="itemIco" style="background: url(../../image/firstpage/t2@3x.png) center/cover no-repeat"></div>
            </div>
            <div class="aui-list-item-inner">
              <div class="aui-list-item-text">
                <div class="aui-list-item-title">{{item.title}}</div>
              </div>
              <div class="aui-info aui-margin-t-5" style="padding:0">
                <div class="aui-info-item">{{item.apply_date}}</div>
              </div>
            </div>
          </div>
        </li>
      </ul>
  </section>
  </div>
  <div class="xsBox sp aui-content">
  <section class="aui-refresh-content spBox">
      <div class="h20"></div>
    <ul class="aui-list aui-media-list">
      <li class="aui-list-item" @click="openDetail('video', '')">
        <div class="aui-list-item-inner">
          <div class="aui-list-item-title">多张图片列表一</div>
          <div class="aui-row aui-row-padded">
            <div class="aui-col-xs-12 item_video">
              <img src="../../image/firstpage/t4@3x.png">
              <div class="mask">
                <div class="mask_mid">
                  <img src="../../image/bf1@3x.png">
                </div>
                <div class="mask_bot">
                  <div class="mask_left">
                    <img src="../../image/bf2@3x.png">29.9万播放
                  </div>
                  <div class="mask_right">
                    02:33
                  </div>
                </div>
              </div>
            </div>
            <div class="aui-info aui-margin-t-5" style="padding:0">
              <div class="aui-info-item">2015-07-14 10:31</div>
            </div>
          </div>
        </div>
      </li>
      <li class="aui-list-item" @click="openDetail('video', '')">
        <div class="aui-list-item-inner">
          <div class="aui-list-item-title">多张图片列表一</div>
          <div class="aui-row aui-row-padded">
            <div class="aui-col-xs-12 item_video">
              <img src="../../image/firstpage/t4@3x.png">
              <div class="mask">
                <div class="mask_mid">
                  <img src="../../image/bf1@3x.png">
                </div>
                <div class="mask_bot">
                  <div class="mask_left">
                    <img src="../../image/bf2@3x.png">29.9万播放
                  </div>
                  <div class="mask_right">
                    02:33
                  </div>
                </div>
              </div>
            </div>
            <div class="aui-info aui-margin-t-5" style="padding:0">
              <div class="aui-info-item">2015-07-14 10:31</div>
            </div>
          </div>
        </div>
      </li>
      <li class="aui-list-item" @click="openDetail('video', '')">
        <div class="aui-list-item-inner">
          <div class="aui-list-item-title">多张图片列表一</div>
          <div class="aui-row aui-row-padded">
            <div class="aui-col-xs-12 item_video">
              <img src="../../image/firstpage/t4@3x.png">
              <div class="mask">
                <div class="mask_mid">
                  <img src="../../image/bf1@3x.png">
                </div>
                <div class="mask_bot">
                  <div class="mask_left">
                    <img src="../../image/bf2@3x.png">29.9万播放
                  </div>
                  <div class="mask_right">
                    02:33
                  </div>
                </div>
              </div>
            </div>
            <div class="aui-info aui-margin-t-5" style="padding:0">
              <div class="aui-info-item">2015-07-14 10:31</div>
            </div>
          </div>
        </div>
      </li>
    </ul>
</section>
  </div>
  <div class="xsBox zb aui-content">
  <section class="aui-refresh-content zbBox">
      <div class="h20"></div>
    <ul>
      <li>
        <h5>台州第八届单身男女相亲会 <span>直播中</span></h5>
      </li>
      <li>
        <h5>台州第八届单身男女相亲会 <span>直播中</span></h5>
      </li>
      <li>
        <h5>台州第八届单身男女相亲会 <span>直播中</span></h5>
      </li>
      <li>
        <h5>台州第八届单身男女相亲会 <span>直播中</span></h5>
      </li>
      <li>
        <h5>台州第八届单身男女相亲会 <span>直播中</span></h5>
      </li>
      <li>
        <h5>台州第八届单身男女相亲会 <span>直播中</span></h5>
      </li>
      <li>
        <h5>台州第八届单身男女相亲会 <span>直播中</span></h5>
      </li>
      <li>
        <h5>台州第八届单身男女相亲会 <span>直播中</span></h5>
      </li>
    </ul>
</section>
  </div>
  <div class="xsBox jh aui-content">
  <section class="aui-refresh-content jhBox">
    <div class="h20"></div>
    <ul class="aui-list aui-media-list">
      <li class="aui-list-item" @click="openDetail('xc', '文章详情', item.newsId)" v-for="item in newsList2">
        <div class="aui-media-list-item-inner">
          <div class="aui-list-item-media">
            <!-- <img :src="item.pics" v-if="item.pics && item.pics != ''">
            <img src="../../image/firstpage/t1@3x.png" v-else> -->
            <div v-if="item.pics && item.pics != ''" class="itemIco" :style="'background: url('+ item.pics +') center/cover no-repeat'"></div>
            <div v-else class="itemIco" style="background: url(../../image/firstpage/t1@3x.png) center/cover no-repeat"></div>
          </div>
          <div class="aui-list-item-inner">
            <div class="aui-list-item-text">
              <div class="aui-list-item-title">{{item.title}}</div>
            </div>
            <div class="aui-info aui-margin-t-5" style="padding:0">
              <div class="aui-info-item">{{item.creatTime}}</div>
            </div>
          </div>
        </div>
      </li>
    </ul>
</section>
    <div class="h20"></div>
    <div class="jh_btn">
      <a href="javascript:;" @click="fbyh()">发布疑惑</a>
    </div>
  </div>
</div>
</div>
<script type="text/javascript" src="../../script/api.js"></script>
<script src="../../script/aui-tab.js"></script>
<script type="text/javascript" src="../../script/aui-scroll.js"></script>
<script type="text/javascript" src="../../script/vue.min.js"></script>
<script type="text/javascript" src="../../script/utils.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script src="../../script/aui-pull-refresh.js"></script>
<script>
apiready = function() {

  var app = new Vue({
    el: '#app',
    data: {
      newsList: [],
		  page: 1,
      totalpage: 1,
        newsList2: [],
  		  page2: 1,
        totalpage2: 1,
    },
    created: function() {
      var $_this = this;
      api.ajax({
        url: window.Url.getMeetingList + $_this.page,
        timeout: 300,
      }, function(ret, err) {
          if (ret) {
              // api.alert({ msg: JSON.stringify(ret) });
              if (ret.data == null) return
              $_this.newsList = ret.data.newsList
          } else {
              api.alert({ msg: JSON.stringify(err) });
          }
      })
      var scroll = new auiScroll({
            listen:true, //是否监听滚动高度，开启后将实时返回滚动高度
            distance:40 //判断到达底部的距离，isToBottom为true
        },function(ret){
           if (ret.isToBottom) {
             $_this.page ++
             if ($_this.page > $_this.totalpage) {
               $_this.page = $_this.totalpage
               return
             }
             api.ajax({
               url: window.Url.getMeetingList + $_this.page,
     					timeout: 300,
     				}, function(ret, err) {
     				    if (ret) {
     				       //  api.alert({ msg: JSON.stringify(ret) });
     								$_this.newsList = $_this.newsList.concat(ret.data.newsList)

     				    } else {
     				        api.alert({ msg: JSON.stringify(err) });
     				    }
     				})
           }
        });
        api.ajax({
          url: window.Url.getArticleList + '7/' + $_this.page2,
          timeout: 300,
        }, function(ret, err) {
            if (ret) {
                // api.alert({ msg: JSON.stringify(ret) });
                if (ret.code == 1) {
                  return
                }
                $_this.newsList2 = ret.data.newsList
            } else {
                api.alert({ msg: JSON.stringify(err) });
            }
        })
        var scroll = new auiScroll({
              listen:true, //是否监听滚动高度，开启后将实时返回滚动高度
              distance:40 //判断到达底部的距离，isToBottom为true
          },function(ret){
             if (ret.isToBottom) {
               $_this.page2 ++
               if ($_this.page2 > $_this.totalpage2) {
                 $_this.page2 = $_this.totalpage2
                 return
               }
               api.ajax({
                 url: window.Url.getArticleList + '7/' + $_this.page2,
       					timeout: 300,
       				}, function(ret, err) {
       				    if (ret) {
       				       //  api.alert({ msg: JSON.stringify(ret) });
       								$_this.newsList2 = $_this.newsList2.concat(ret.data.newsList)

       				    } else {
       				        api.alert({ msg: JSON.stringify(err) });
       				    }
       				})
             }
          });
    },
    methods: {
      openDetail: function (type, title, id) {
        api.openWin({
          name: 'index_detail_' + type,
          pageParam: {
            name: 'index_detail_' + type,
            title: title,
            id: id
          },
          url: './index_detail_' + type + '.html',
          delay: 200,
          bounces: false
        });
      },
      fbyh: function () {
        api.openWin({
          name: 'index_xs_fbyh',
          pageParam: {
            name: 'index_xs_fbyh',
          },
          url: './index_xs_fbyh.html',
          delay: 200,
          bounces: false
        });
      },
      open_jhBox:function() {
        var $_this = this;
        var pullRefresh4 = new auiPullToRefresh({
            container: document.querySelector('.jhBox'),
            triggerDistance: 100
        },function(ret){
            if(ret.status=="success"){
              $_this.page2 = 1
              api.ajax({
                url: window.Url.getArticleList + '7/' + $_this.page2,
                timeout: 300,
              }, function(ret, err) {
                  if (ret) {
                      // api.alert({ msg: JSON.stringify(ret) });
                      setTimeout(function() {
                        if (ret.code == 1) {
                          pullRefresh4.cancelLoading(); //刷新成功后调用此方法隐藏
                          return
                        }
                        $_this.newsList2 = ret.data.newsList
                        pullRefresh4.cancelLoading(); //刷新成功后调用此方法隐藏
                      },500)
                  } else {
                      api.alert({ msg: JSON.stringify(err) });
                  }
              })

            }
        })
      },
      open_hyBox:function() {
        var $_this = this;
        var pullRefresh1 = new auiPullToRefresh({
            container: document.querySelector('.hyBox'),
            triggerDistance: 100
        },function(ret){
            if(ret.status=="success"){
              $_this.page = 1
              api.ajax({
                url: window.Url.getMeetingList + $_this.page,
                timeout: 300,
              }, function(ret, err) {
                  if (ret) {
                      // api.alert({ msg: JSON.stringify(ret) });
                      setTimeout(function() {
                          if (ret.data == null) {
                            pullRefresh1.cancelLoading(); //刷新成功后调用此方法隐藏
                            return;
                          }
                          $_this.newsList = ret.data.newsList
                            pullRefresh1.cancelLoading(); //刷新成功后调用此方法隐藏
                      },500)
                  } else {
                      api.alert({ msg: JSON.stringify(err) });
                  }
              })
            }
        })
      },
      open_spBox:function() {
        var $_this = this;
        var pullRefresh2 = new auiPullToRefresh({
            container: document.querySelector('.spBox'),
            triggerDistance: 100
        },function(ret){
            if(ret.status=="success"){
                setTimeout(function() {
                  pullRefresh2.cancelLoading(); //刷新成功后调用此方法隐藏
                },500)
            }
        })
      },
      open_zbBox:function() {
        var $_this = this;
        var pullRefresh3 = new auiPullToRefresh({
            container: document.querySelector('.zbBox'),
            triggerDistance: 100
        },function(ret){
            if(ret.status=="success"){

                setTimeout(function() {
                  pullRefresh3.cancelLoading(); //刷新成功后调用此方法隐藏
                },500)

            }
        })
      }
    },
    mounted: function () {
      var tab = new auiTab({
        element:document.getElementById("xsTab"),
        index:1,
        repeatClick:false
      },function(ret){
        var xsBox = document.querySelectorAll('.xsBox')
        for (var i = 0; i < xsBox.length; i++) {
          xsBox[i].style.display = 'none'
        }
        document.querySelectorAll('.xsBox')[ret.index - 1].style.display =  'block'
      });

      var $_this = this;
      var pullRefresh1 = new auiPullToRefresh({
          container: document.querySelector('.hyBox'),
          triggerDistance: 100
      },function(ret){
          if(ret.status=="success"){
            $_this.page = 1
            api.ajax({
              url: window.Url.getMeetingList + $_this.page,
              timeout: 300,
            }, function(ret, err) {
                if (ret) {
                    // api.alert({ msg: JSON.stringify(ret) });
                    setTimeout(function() {
                        if (ret.data == null) {
                          pullRefresh1.cancelLoading(); //刷新成功后调用此方法隐藏
                          return;
                        }
                        $_this.newsList = ret.data.newsList
                          pullRefresh1.cancelLoading(); //刷新成功后调用此方法隐藏
                    },500)
                } else {
                    api.alert({ msg: JSON.stringify(err) });
                }
            })
          }
      })
    }
  })
}
</script>
</body>
</html>
